import Vue from 'vue'
export default async function device(){
	//判断打开的应用场景
	// #ifdef MP-WEIXIN
		return "wx"
	// #endif
	// #ifdef MP-QQ
		return "qq"
	// #endif
	// #ifdef APP-PLUS
		return "app"
	// #endif
	// #ifdef H5
		var  data = await other()
		Vue.prototype.Device = data
		return data
	// #endif
}

function other(){
	return new Promise((resolve)=>{
		document.addEventListener("YibanDeviceReady",  ()=> {
			resolve("yiban")
		});
		setTimeout(()=>{
			resolve("h5")
		},1000)
	})
}